/* eslint-disable */
import request from "@/request";

/** listApplications GET /api/merchant/application/list */
export async function listApplicationsUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listApplicationsUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageMerchantApplication_>(
    "/api/merchant/application/list",
    {
      method: "GET",
      params: {
        // current has a default value: 1
        current: "1",
        // pageSize has a default value: 10
        pageSize: "10",
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** listPendingApplications GET /api/merchant/application/list/pending */
export async function listPendingApplicationsUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listPendingApplicationsUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageMerchantApplication_>(
    "/api/merchant/application/list/pending",
    {
      method: "GET",
      params: {
        // current has a default value: 1
        current: "1",
        // pageSize has a default value: 10
        pageSize: "10",
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** getMyApplication GET /api/merchant/application/my */
export async function getMyApplicationUsingGet(options?: {
  [key: string]: any;
}) {
  return request<API.BaseResponseMerchantApplication_>(
    "/api/merchant/application/my",
    {
      method: "GET",
      ...(options || {}),
    }
  );
}

/** reviewApplication POST /api/merchant/application/review */
export async function reviewApplicationUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.reviewApplicationUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/merchant/application/review", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** submitApplication POST /api/merchant/application/submit */
export async function submitApplicationUsingPost(
  body: API.MerchantApplicationRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>("/api/merchant/application/submit", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
